Optimal. Leaf size=41 \[ -x \sec \left (a+b \log \left (c x^n\right )\right )+b n x \sec \left (a+b \log \left (c x^n\right )\right ) \tan \left (a+b \log \left (c x^n\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.10, antiderivative size = 175, normalized size of antiderivative = 4.27, number of steps
used = 7, number of rules used = 3, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.068, Rules used = {4599, 4601,
371} \begin {gather*} \frac {16 e^{3 i a} b^2 n^2 x \left (c x^n\right )^{3 i b} \, _2F_1\left (3,\frac {1}{2} \left (3-\frac {i}{b n}\right );\frac {1}{2} \left (5-\frac {i}{b n}\right );-e^{2 i a} \left (c x^n\right )^{2 i b}\right )}{1+3 i b n}-2 e^{i a} x (1-i b n) \left (c x^n\right )^{i b} \, _2F_1\left (1,\frac {1}{2} \left (1-\frac {i}{b n}\right );\frac {1}{2} \left (3-\frac {i}{b n}\right );-e^{2 i a} \left (c x^n\right )^{2 i b}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 4599
Rule 4601
Rubi steps
\begin {align*} \int \left (-\left (1+b^2 n^2\right ) \sec \left (a+b \log \left (c x^n\right )\right )+2 b^2 n^2 \sec ^3\left (a+b \log \left (c x^n\right )\right )\right ) \, dx &=\left (2 b^2 n^2\right ) \int \sec ^3\left (a+b \log \left (c x^n\right )\right ) \, dx+\left (-1-b^2 n^2\right ) \int \sec \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\left (2 b^2 n x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}} \sec ^3(a+b \log (x)) \, dx,x,c x^n\right )+\frac {\left (\left (-1-b^2 n^2\right ) x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}} \sec (a+b \log (x)) \, dx,x,c x^n\right )}{n}\\ &=\left (16 b^2 e^{3 i a} n x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {x^{-1+3 i b+\frac {1}{n}}}{\left (1+e^{2 i a} x^{2 i b}\right )^3} \, dx,x,c x^n\right )+\frac {\left (2 e^{i a} \left (-1-b^2 n^2\right ) x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {x^{-1+i b+\frac {1}{n}}}{1+e^{2 i a} x^{2 i b}} \, dx,x,c x^n\right )}{n}\\ &=-2 e^{i a} (1-i b n) x \left (c x^n\right )^{i b} \, _2F_1\left (1,\frac {1}{2} \left (1-\frac {i}{b n}\right );\frac {1}{2} \left (3-\frac {i}{b n}\right );-e^{2 i a} \left (c x^n\right )^{2 i b}\right )+\frac {16 b^2 e^{3 i a} n x \left (c x^n\right )^{3 i b} \, _2F_1\left (3,\frac {1}{2} \left (3-\frac {i}{b n}\right );\frac {1}{2} \left (5-\frac {i}{b n}\right );-e^{2 i a} \left (c x^n\right )^{2 i b}\right )}{3 i b+\frac {1}{n}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.67, size = 29, normalized size = 0.71 \begin {gather*} x \sec \left (a+b \log \left (c x^n\right )\right ) \left (-1+b n \tan \left (a+b \log \left (c x^n\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.70, size = 525, normalized size = 12.80
method | result | size |
risch | \(-\frac {2 i \left (x^{n}\right )^{i b} c^{i b} x \left (n b \,c^{2 i b} \left (x^{n}\right )^{2 i b} {\mathrm e}^{\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{-\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{\frac {3 b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{3 i a}-b n \,{\mathrm e}^{\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{-\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{\frac {b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{i a}-i \left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{-\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {3 b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{\frac {3 b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{3 i a}-i {\mathrm e}^{\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2}} {\mathrm e}^{-\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )}{2}} {\mathrm e}^{-\frac {b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{\frac {b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )}{2}} {\mathrm e}^{i a}\right )}{\left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i c \right )} {\mathrm e}^{-b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \mathrm {csgn}\left (i x^{n}\right )} {\mathrm e}^{b \pi \,\mathrm {csgn}\left (i c \,x^{n}\right ) \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )} {\mathrm e}^{2 i a}+1\right )^{2}}\) | \(525\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1696 vs.
\(2 (41) = 82\).
time = 0.67, size = 1696, normalized size = 41.37 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.29, size = 47, normalized size = 1.15 \begin {gather*} \frac {b n x \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - x \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (2 b^{2} n^{2} \sec ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )} - b^{2} n^{2} - 1\right ) \sec {\left (a + b \log {\left (c x^{n} \right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.42, size = 87, normalized size = 2.12 \begin {gather*} \frac {2\,x\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}\,\left (-1+b\,n\,1{}\mathrm {i}\right )-2\,x\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,1{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}\,\left (1+b\,n\,1{}\mathrm {i}\right )}{{\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________